package org.test.bookpub.dal;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.test.bookpub.bean.Demo;
import org.test.bookpub.dal.sql.DemoSqlBuilder;

@Mapper
public interface DemoMapper {

	@Delete("delete from demo where id=#{id}")
	void delete(String id);

	@Insert("insert demo(name,age) values(#{name},#{age})")
	Long insert(Demo demo);

	@SelectProvider(type = DemoSqlBuilder.class, method = "queryListByCondition")
	List<Demo> queryListByCondition(Demo demo);
}
